﻿function $import(path, type) {
    var i, base, src = "common.js", scripts = document.getElementsByTagName("script");
    for (i = 0; i < scripts.length; i++) {
        if (scripts[i].src.match(src)) {
            base = scripts[i].src.replace(src, "");
            break;
        }
    }

    if (type == "css") {
        document.write(" <" + "link href=\"" + base + path + "\" rel=\"stylesheet\" type=\"text/css\"> </" + "link>");
    }
    else {
        document.write(" <" + "script src=\"" + base + path + "\"> </" + "script>");
    }
}
$import("jquery-1.4.min.js", "js");
$import("lotterymanagement.js", "js");
